<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2.创建一个按钮对象</title>
    <script>
        // 按钮对象，包含宽、高、背景颜色和点击行为
        var obj = new Object();
        obj.weight = '宽';
        obj.hight = '高';
        obj.backGroundColor = '背景颜色'
        obj.click = function (click) {
            console.log('点击');
        };
        for (k in obj) {
            console.log(obj[k]);
        }
    </script>
</head>

<body>

</body>

</html>